package com.example.composestudy.data.models

import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.animateDpAsState
import androidx.compose.animation.core.animateIntOffsetAsState
import androidx.compose.animation.core.animateOffsetAsState
import androidx.compose.animation.core.animateSizeAsState
import com.example.composestudy.ui.navigation.Screens

data class HomeObject(
    var route: String = "",
    var title: String = "",
    var description: String = "",
)

object HomeData {
    val conversationHomeObject = listOf(
        HomeObject(
            Screens.BasicKnowledgePageA.route,
            "基础知识 - 列表页面",
            "用组合函数实现一个简单的列表页面，包括简单的布局排版、状态记录及点击动画"
        ),

        HomeObject(
            Screens.BasicKnowledgePageB.route,
            "基础知识 - 基本布局",
            "一个compose中的基本布局页面"
        ),

        HomeObject(
            Screens.WellnessTasksPage.route,
            "基础知识 - 状态和事件",
            "通过一个健康任务的页面，看待 Jetpack Compose 界面中的状态和事件"
        ),

        HomeObject(
            Screens.AnimatedVisibilityPage.route,
            "高级状态和副作用",
            "学习与 Jetpack Compose 中的状态和副作用 API 相关的高级概念。了解如何为复杂的有状态可组合项创建状态容器、通过 Compose 代码创建协程和调用挂起函数，以及针对不同的用例触发副作用"
        ),
    )
}

object DiscoveryData {
    val conversationHomeObject = listOf(
        HomeObject(
            Screens.CanvasPage.route,
            "Canvas绘图",
            "介绍如何在Jetpack Compose中使用Canvas进行绘图"
        ),
    )
}

object SettingsData {
    val conversationHomeObject = listOf(
        HomeObject(
            Screens.getHomeRoute("AnimatedPageKey"),
            "动画",
            "如何使用 Jetpack Compose 中的一些 Animation API"
        ),
    )
}


object AnimatedData {
    val conversationHomeObject = listOf(
        HomeObject(
            Screens.AnimateXPage.route,
            "animate * AsState 系列",
            " - animateColorAsState\n" +
                    " - animateFloatAsState\n" +
                    " - animateDpAsState\n" +
                    " - animateIntAsState\n" +
                    " - animateIntOffsetAsState\n" +
                    " - animateIntSizeAsState\n" +
                    " - animateOffsetAsState\n" +
                    " - animateRectAsState\n" +
                    " - animateSizeAsState\n" +
                    " - animateValueAsState"
        ),

        HomeObject(
            Screens.AnimatedVisibilityPage.route,
            "AnimatedVisibility",
            "使用 AnimatedVisibility 可隐藏或显示可组合项"
        ),

        HomeObject(
            Screens.AnimateTextPage.route,
            "文本的缩放、平移或旋转添加动画效果",
            "为文本的缩放、平移或旋转添加动画效果时，请将 TextStyle 上的 textMotion 参数设置为 TextMotion.Animated。这样可以确保文本动画之间的过渡更流畅。使用 Modifier.graphicsLayer{ } 可平移、旋转或缩放文本。"
        ),

        HomeObject(
            Screens.AnimatedContentPage.route,
            "AnimatedContent",
            "使用 AnimatedContent 在不同的可组合项之间添加动画效果；如果您只是想在可组合项之间进行标准淡入淡出，请使用 Crossfade。"
        ),
    )
}